using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using DataAccess;
using Presentation.Contracts;
using Task.Contracts;
using Task;

namespace Presentation
{
    public class DefaultPresenter
    {

        private IDefaultView view;

        private IArtTask artTask;

		private IForumTask forumTask;

        private SecurityTask secTask;

        public DefaultPresenter(IDefaultView view)
        {
            this.view = view;
            this.artTask = new ArtTask();
			this.forumTask = new ForumTask();
		
            this.secTask = new SecurityTask();
        }


        public void FillPage()
        {
            List<art> lastAdded = artTask.ReadLastArt();
            view.DisplayLastArt(lastAdded);

            IList bestArt = artTask.ReadBestArt();
            view.DisplayBestArt(bestArt);

			List<forum> lastActiveForums = forumTask.GetForumsByNewestComment(0, 9);
			view.DisplayLastActiveForums(lastActiveForums);
            IList<user> lastUsers = secTask.GetLastUsers();
            view.DisplayLastUsers(lastUsers);


        }





    }
}
